This set of R scripts replicates the simulations in "Robust Standard Errors in
Small Samples: Some Practical Advice" by Imbens and Kolesár. You can download
the R package that implements the Bell-McCaffrey dof correction from

https://github.com/kolesarm/Robust-Small-Sample-Standard-Errors

Description of replication files:

- "helper-functions.R" contains three auxilliary functions used by "binary.R"
  and "cluster.R". MatSqrtInverse() computes the inverse square root of a
  matrix. ConvertSETypes(), takes a list of standard error types, and converts
  it into a data frame. FindMinInterval() inverts a test to construct a
  confidence interval.
- "binary.R" imlements the simulation design from Section 2.6 and
  reproduces Tables 1, 2 and 3.
- "cluster.R" imlements the simulation design from Section 4.1 and reproduces
  Tables 4 and 5.
- the file "replicate.R" uses "binary.R" and "cluster.R" to replicate Tables
  1--5 in the paper. In particular, running

  source("replicate.R")

  will reproduce the tables. Sourcing the file may take a long time (over a
  day), so adjust the number of simulation draws (arguments nsim and nsimb to
  the ComputeAndPrintResults() function) to make it run faster. The results are
  stored in a file called "resultsTIMESTAMP.txt" in the current working
  directory. Comment the sink functions to display them in the R console.


TODO: upload cluster.R (had extra readme file), upload simulation results when
ready and include that here in readme file
